﻿Imports System
Imports System.Runtime.InteropServices

Namespace System.Workflow
    Friend Class Utility
        ' Methods
        Friend Shared Function CreateGuid(ByVal guidString As String) As Guid
            Dim flag As Boolean = False
            Dim empty As Guid = Guid.Empty
            Try 
                empty = New Guid(guidString)
                flag = True
            End Try
            Return empty
        End Function

        Friend Shared Function TryCreateGuid(ByVal guidString As String, <Out> ByRef result As Guid) As Boolean
            Dim flag As Boolean = False
            result = Guid.Empty
            Try 
                result = New Guid(guidString)
                flag = True
            Catch exception1 As ArgumentException
            Catch exception2 As FormatException
            Catch exception3 As OverflowException
            End Try
            Return flag
        End Function

    End Class
End Namespace

